1. Technical Field
The embodiments herein generally relate to video processing, and, more particularly, to two-dimensional downscaling of a video.
2. Description of the Related Art
Scaling two-dimensional signal data (e.g., video frames) is encountered in many applications. The most common case is the need to display video on screens with different resolutions than the source. There are many displays with different resolutions available today such as VGA (480×640), QVGA (240×320) and many others that are used in different environments.
Running analog TV receivers at 13.5 MHz, for example, yields Y/C component signals with 720 pixels/line and 288 lines for PAL analog TV system (different dimensions are obtained for other analog TV systems, for example, NTSC signal has 704 pixels/line and 242 lines/field). For display on QVGA resolution (320 pixels/line, 240 lines/field), horizontal scaling is required to scale 720 pixels down to 320 pixels with a downsampling ratio of 9/4 (for NTSC, other downsampling ratio is required which is 11/5). Also, to receive the required number of lines/picture by the targeted display, cropping could be used in the case of NTSC by removing the first and last lines. In case of PAL, vertical scaling is needed (as cropping would remove significant part of the picture). Each 288 lines should produce 240 lines; i.e., a downsampling ratio of 6/5.
There are several ways to downsample a given signal. One approach is to simply drop pixels. For example, if downscaling with ratio q/p is required (where p<q), then one simple approach would merely be to select p samples (or lines in vertical direction) from each q samples (or lines). While this method is very simple, the rescaled signal data is affected by aliasing and uneven spacing between samples and lines. Another approach uses a general resampling structure, where the signal is resampled by p in both directions and then filtered by applying a low-pass filter to remove images caused by upsampling and aliasing caused by the next downsample-by-q block. This approach, however, is complex, especially in the vertical dimension, and requires significant memory and processing resources.